Skip to content

Conversation

Centri3
Copy link
Member

@Centri3 Centri3 commented Jun 5, 2023

this will check every local for TerminatorKind::Drop to ensure they can be evaluated at compile time, not sure if this is the best way to do this but MIR is confusing and it works so...

fixes #10617

changelog: [missing_const_for_fn]: Ensure dropped locals are ~const Destruct

@rustbot
Copy link
Collaborator

rustbot commented Jun 5, 2023

r? @Alexendoo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 5, 2023
@Alexendoo
Copy link
Member

I have no experience on the MIR side of things, r? @Jarcho who I think does

@rustbot rustbot assigned Jarcho and unassigned Alexendoo Jun 7, 2023
@Centri3
Copy link
Member Author

Centri3 commented Jun 8, 2023

Ok, I got it working... Sorry for wasting your time with the trait solver shebacle 😅

@Centri3 Centri3 force-pushed the missing_const_for_fn branch from 3fa7739 to a495fa0 Compare June 10, 2023 02:47
@Centri3 Centri3 force-pushed the missing_const_for_fn branch from 34883b2 to 9bc5a14 Compare June 13, 2023 18:19
@Jarcho
Copy link
Contributor

Jarcho commented Jun 13, 2023

Thank you. @bors r+

@bors
Copy link
Contributor

bors commented Jun 13, 2023

📌 Commit 9bc5a14 has been approved by Jarcho

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jun 13, 2023

⌛ Testing commit 9bc5a14 with merge eefc2a0...

@bors
Copy link
Contributor

bors commented Jun 13, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing eefc2a0 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[missing_const_for_fn] does not take into account whether receiver is ~const Destruct
5 participants